import java.util.Scanner;
import java.util.Stack;

/**
 * Creat with IntelliJ IDEA
 * Description
 * User: mamba24
 * Date: 2022-07-13
 * Time: 15:04
 * To BE A Better Person-2020-3-2
 */
public class TestDemo {

    static Stack<String> stack=new Stack<>();
    public static void calFood(String s){
        int i = 0;
        int j = 0;
        for (; i < s.length(); i++) {

            if(s.charAt(i)==' ' && !stack.contains(s.substring(j,i-1))){
                stack.push(s.substring(j,i-1));
                j=i+1;
            }
        }
        if(!stack.contains(s.substring(j,i-1))){
            stack.push(s.substring(j,i-1));
        }
    }
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);

        while(sc.hasNextLine()){
            String food=sc.nextLine();
            calFood(food);
        }
        System.out.println(stack.size());
    }

    /**
     * 算出key值附近的斐波那契数，计算两个的差值
     * @param key
     * @return返回较小值
     */
    public static int findFibnumber(int key){
        int fib1=0;
        int fib2=1;
        int temp=0;
        while(true){
            temp=fib1+fib2;
            fib1=fib2;
            fib2=temp;
            if(temp>=key){
                break;
            }
        }
        if(temp==key){
            return 0;
        }else{
            return (key-fib1)>(temp-key)?temp-key:key-fib1;
        }
    }
    public static void main1(String[] args) {
        Scanner sc=new Scanner(System.in);
        int key=sc.nextInt();
        int ret=findFibnumber(key);
        System.out.println(ret);
    }
}
